#pragma once

#include <iostream>

class AbstractClass
{
public:
    virtual ~AbstractClass() = default;

public:
    void templateMethod() const
    {
        this->requirementAnalysis();
        this->softwareDesign();
        this->programDevelope();
        this->programTesting();
        this->deployment();
    }

protected:
    virtual void requirementAnalysis() const
    {
        std::cout << "需求分析" << std::endl;
    }
    virtual void softwareDesign() const = 0;
    virtual void programDevelope() const
    {
        std::cout << "程序开发" << std::endl;
    }
    virtual void programTesting() const
    {
        std::cout << "程序测试" << std::endl;
    }
    virtual void deployment() const = 0;
};

class FrontEndDevelopment : public AbstractClass
{
public:
    FrontEndDevelopment(){};
    ~FrontEndDevelopment(){};

protected:
    void softwareDesign() const override
    {
        std::cout << "前端技术选型" << std::endl;
    }
    void deployment() const override
    {
        std::cout << "前端软件部署" << std::endl;
    }
};

class BackEndDevelopment : public AbstractClass
{
public:
    BackEndDevelopment(){};
    ~BackEndDevelopment(){};

protected:
    void softwareDesign() const override
    {
        std::cout << "后端技术选型" << std::endl;
    }
    void deployment() const override
    {
        std::cout << "后端软件部署" << std::endl;
    }
};
